package com.un.ebs.contract.domain;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import org.springframework.stereotype.Component;
import lombok.Data;
import com.un.ebs.core.metadata.DbField;

/**
 * (ContractItemWriteOff)表实体类
 *
 * @author liubo
 * @since 2020-09-04 10:06:03
 */
@Data
@Component
@TableName("tb_contract_item_write_off")
@SuppressWarnings("serial")
public class ContractItemWriteOff extends Model<ContractItemWriteOff> {

    @TableId(value = "id", type = IdType.UUID)
    private String id;


    @DbField(name = "formal_contract_item_id", length = 40, precision = 0)
    private String formalContractItemId;

    @DbField(name = "formal_contract_code", length = 50, precision = 0)
    private String formalContractCode;

    @DbField(name = "temporary_contract_item_id", length = 40, precision = 0)
    private String temporaryContractItemId;

    @DbField(name = "temporary_contract_code", length = 50, precision = 0)
    private String temporaryContractCode;

    @DbField(name = "write_off_qty", length = 18, precision = 4)
    private Double writeOffQty;

    @DbField(name = "sku_id", length = 40, precision = 0)
    private String skuId;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at",  length = 40 , precision = 0)
    private String createAt;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_at_name",  length = 50 , precision = 0)
    private String createAtName;

    @TableField(fill = FieldFill.INSERT)
    @DbField(name = "create_time",  length = -1 , precision = 0)
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}